package tas.co.in.controller.problemInfo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

import java.util.List;
import java.util.StringTokenizer;

import tas.co.in.dao.problemInfo.problemInfo;
import tas.co.in.domain.problemInfo.problemInfoBean;

public class problemInfoController extends MultiActionController {
	private problemInfo info;

	/**
	 * @param info
	 *            the info to set
	 */
	public void setInfo(problemInfo info)
	{
		this.info = info;
	}
	public ModelAndView getCustPrblm(HttpServletRequest request,
			HttpServletResponse response) 
	{
		List<problemInfoBean> resultObject = info.getCustprblm();
		return new ModelAndView("sharedJSP/custpro", "resultObject",
				resultObject);
	}
	public ModelAndView updateIssues(HttpServletRequest request,
			HttpServletResponse response){		
		
		StringTokenizer items = new StringTokenizer(request.getParameter("customerissue"), ",");
		
		boolean resultObject = info.setUpdate(items);		
		
		return new ModelAndView("sharedJSP/BooleanResults","resultObject",resultObject);
	}

	

}